package com.example.player.dao.viewmodel;

import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;

import com.example.player.domain.entity.Song;

import java.util.List;

/**
 * 用于组件间共享数据的viewmodel
 * @author 朱文权
 * */
public class SharedViewModel extends ViewModel {
    private MutableLiveData<List<Song>> localMusicSongs=new MutableLiveData<>();
    public LiveData<List<Song>> getLocalMusicSongs() {
        return localMusicSongs;
    }

    public void setLocalMusicSongs(List<Song> localMusicSongs) {
        this.localMusicSongs.setValue(localMusicSongs);
    }
}
